<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>rest参数</title>
</head>
<body>
  <script>
    /*
    * rest参数
    * 1. rest参数之后不能再有其它参数
    * 2. 函数的length属性，不包括rest参数
    */
    function add(...value) {
      let sum = 0
      console.log(value)
    }
    add(2,3,4)
  </script>
</body>
</html>